<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('idcard_country_auth', function (Blueprint $table) {
            $table->engine  = 'InnoDB';
            $table->comment('实名认证');

            $table->bigIncrements('id');
            $table->integer('create_time')->comment('创建时间')->unsigned()->default(0);
            $table->integer('biz_id')->comment('游戏备案识别码')->unsigned()->default(0);
            $table->char('idcard', 18)->comment('身份证号码')->default('');
            $table->string('name', 32)->comment('身份证名称')->default('');
            $table->char('pi', 38)->comment('用户唯一标识')->default('');
            $table->string('check_source', 20)->comment('校验供应商')->default('');

            $table->index('create_time');
            $table->index('biz_id');
            $table->index('idcard');
            $table->index('name');
            $table->index('pi');
            $table->index('check_source');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('idcard_country_auth');
    }
};
